<?php
namespace app\index\model;

use think\Db;
use think\Model;

class BlReport extends Model
{

    /*t_log_bl
    病理日志
    t_log_TCT
    TCT 日志*/
    protected $dbName = 'blsjk';
    protected $table = 'T_tctbgd';

    //返回BL的样本信息 根据id
    public function GetReportBlInfoByYbid($str){
        $data = [];

        /*return $this->db()->where('ybid',$str)->select();*/
        return $data = Db::connect("database_Bl")->table("T_bljbxxb")->where('ybid',$str)->select();

    }

    //根据BL的样本信息  根据姓名
    public  function  GetBlReportInfoByBrxm($str){
        return $data = Db::connect("database_Bl")->table("T_bljbxxb")->where('brxm',$str)->select();
    }



    //返回BL的样本信息 根据BL的编号  blbh
    public function GetReportBlInfoByBlbh($str){
        $data = [];
        /*return $this->db()->where('ybid',$str)->select();*/
        return Db::connect("database_Bl")->table("T_bljbxxb")->where('xbblxh',$str)->select();
    }

    //updateBL 方法
    public function updateBl($yid,$res = array()){
        return Db::connect('database_Bl')->table("T_bljbxxb")->where(array('ybid' => $yid))->update($res);
    }

}